<div class="list-home">
    <?php
    $i=0;
    foreach($data as $result):
    $i++;
    if($result["type"]==0){
        $slug_type="chu-ky-so";
    }elseif($result["type"]==1){
        $slug_type ="du-an-tieu-bieu";
    }elseif($result["type"]==2){
        $slug_type ="kinh-nghiem-thiet-ke";
    }
    ?>

        <div class="list-items-l margin-tt <?
            if($i%2==0){
                print 'odd1';
            }
            ?>">
        <p class="list-items-title">
            <a href="<?php echo $slug_type.'/'.$result["slug"].'-t'.$result["id"].'.html';?>"><?=$result["title"]?></a>
        </p>
        <div class="list-item-con clearfix">
            <?php
            if(!empty($result["image"])):?>
                <a href="<?php echo $slug_type.'/'.$result["slug"].'-t'.$result["id"].'.html';?>">
                    <img class="list-items-img" src="<?$result["image"]?>" title="<?=$result["title"]?>" alt="<?=$result["title"]?>">
                </a>
            <?php endif;
            ?>
            <p class="date-time1"><?php print date('d/m/Y h:i',strtotime($result["created"]))?> -  141 Lượt xem</p>
            <p class="list-items-con"><font face="arial, helvetica, sans-serif" size="2">Sản phẩm:&nbsp;
                <?php if(!empty($result['description'])){
                    echo $result['description'];
                }?>
                <a href="<?php if(!empty($result['link'])){
                    echo $result['link'];
                }?>" target="_blank">Xem sản phẩm</a></font></p>
        </div>
        </div>
    <?php endforeach;?>
	<div class="list-items-l margin-tt">
        <div class="sas-padding-class1" style="text-align:center">
			<?php
                echo $this->pagination->create_links(); // tạo link phân trang
            ?>
        </div>
    </div>
</div>
